package mysql

import "gorm.io/gorm"

type Goods struct {
	gorm.Model
	GoodsName   string  `gorm:"type:varchar(50);not null;comment:'商品名称'"`
	GoodsPrice  float64 `gorm:"type:decimal(10,2);not null;comment:'商品价格'"`
	GoodsStock  int     `gorm:"type:int(11);not null;comment:'商品库存'"`
	GoodsStatus int     `gorm:"type:int;default:1;comment:'商品状态:0-未上架,1-上架'"`
	GoodsCover  string  `gorm:"type:varchar(255);not null;comment:'商品封面'"`
}
type GoodsCart struct {
	gorm.Model
	GoodsId    int     `gorm:"int(11);not null;comment:'商品id'"`
	UserId     int     `gorm:"int(11);not null;comment:'用户id'"`
	GoodsName  string  `gorm:"type:varchar(50);not null;comment:'商品名称'"`
	GoodsPrice float64 `gorm:"type:decimal(10,2);not null;comment:'商品价格'"`
	GoodsCover string  `gorm:"type:varchar(255);not null;comment:'商品封面'"`
	GoodsNum   int     `gorm:"type:int(11);not null;comment:'商品数量'"`
	Checked    int     `gorm:"type:int;default:1;comment:'商品状态:0-未选中,1-选中'"`
}
